Integrand size = 21, antiderivative size = 126 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {a \left (4 a^2-3 b^2\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a \left (4 a^2-3 b^2\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec ^3(c+d x) (a+b \tan (c+d x))^2}{5 d}+\frac {b \sec ^3(c+d x) \left (8 \left (6 a^2-b^2\right )+21 a b \tan (c+d x)\right )}{60 d} \]
1/8*a*(4*a^2-3*b^2)*arctanh(sin(d*x+c))/d+1/8*a*(4*a^2-3*b^2)*sec(d*x+c)*t an(d*x+c)/d+1/5*b*sec(d*x+c)^3*(a+b*tan(d*x+c))^2/d+1/60*b*sec(d*x+c)^3*(4 8*a^2-8*b^2+21*a*b*tan(d*x+c))/d
Leaf count is larger than twice the leaf count of optimal. \(464\) vs. \(2(126)=252\).
Time = 2.46 (sec) , antiderivative size = 464, normalized size of antiderivative = 3.68 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {\sec ^5(c+d x) \left (960 a^2 b+64 b^3+320 \left (3 a^2 b-b^3\right ) \cos (2 (c+d x))-300 a^3 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+225 a b^2 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-60 a^3 \cos (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+45 a b^2 \cos (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-150 a \left (4 a^2-3 b^2\right ) \cos (c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+300 a^3 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-225 a b^2 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+60 a^3 \cos (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-45 a b^2 \cos (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+240 a^3 \sin (2 (c+d x))+540 a b^2 \sin (2 (c+d x))+120 a^3 \sin (4 (c+d x))-90 a b^2 \sin (4 (c+d x))\right )}{1920 d} \]
(Sec[c + d*x]^5*(960*a^2*b + 64*b^3 + 320*(3*a^2*b - b^3)*Cos[2*(c + d*x)] - 300*a^3*Cos[3*(c + d*x)]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 225 *a*b^2*Cos[3*(c + d*x)]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 60*a^3* Cos[5*(c + d*x)]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 45*a*b^2*Cos[5 *(c + d*x)]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 150*a*(4*a^2 - 3*b^ 2)*Cos[c + d*x]*(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d *x)/2] + Sin[(c + d*x)/2]]) + 300*a^3*Cos[3*(c + d*x)]*Log[Cos[(c + d*x)/2 ] + Sin[(c + d*x)/2]] - 225*a*b^2*Cos[3*(c + d*x)]*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 60*a^3*Cos[5*(c + d*x)]*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - 45*a*b^2*Cos[5*(c + d*x)]*Log[Cos[(c + d*x)/2] + Sin[(c + d*x )/2]] + 240*a^3*Sin[2*(c + d*x)] + 540*a*b^2*Sin[2*(c + d*x)] + 120*a^3*Si n[4*(c + d*x)] - 90*a*b^2*Sin[4*(c + d*x)]))/(1920*d)
Time = 0.55 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.03, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 3991, 3042, 4159, 27, 298, 215, 219, 4861, 27, 244, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^3 (a+b \tan (c+d x))^3dx\) |
\(\Big \downarrow \) 3991 |
\(\displaystyle \int \sec ^3(c+d x) \left (a^3+3 b^2 \tan ^2(c+d x) a\right )dx+\int \sec ^3(c+d x) \tan (c+d x) \left (\tan ^2(c+d x) b^3+3 a^2 b\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^3 \left (a^3+3 b^2 \tan (c+d x)^2 a\right )dx+\int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx+\frac {\int \frac {a \left (a^2-\left (a^2-3 b^2\right ) \sin ^2(c+d x)\right )}{\left (1-\sin ^2(c+d x)\right )^3}d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx+\frac {a \int \frac {a^2-\left (a^2-3 b^2\right ) \sin ^2(c+d x)}{\left (1-\sin ^2(c+d x)\right )^3}d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx+\frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \int \frac {1}{\left (1-\sin ^2(c+d x)\right )^2}d\sin (c+d x)+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx+\frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \int \frac {1}{1-\sin ^2(c+d x)}d\sin (c+d x)+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \int \sec (c+d x)^3 \tan (c+d x) \left (\tan (c+d x)^2 b^3+3 a^2 b\right )dx+\frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 4861 |
\(\displaystyle \frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}-\frac {\int b \left (b^2+\left (3 a^2-b^2\right ) \cos ^2(c+d x)\right ) \sec ^6(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}-\frac {b \int \left (b^2+\left (3 a^2-b^2\right ) \cos ^2(c+d x)\right ) \sec ^6(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 244 |
\(\displaystyle \frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}-\frac {b \int \left (b^2 \sec ^6(c+d x)+\left (3 a^2-b^2\right ) \sec ^4(c+d x)\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a \left (\frac {1}{4} \left (4 a^2-3 b^2\right ) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {3 b^2 \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}\right )}{d}-\frac {b \left (-\frac {1}{3} \left (3 a^2-b^2\right ) \sec ^3(c+d x)-\frac {1}{5} b^2 \sec ^5(c+d x)\right )}{d}\) |
-((b*(-1/3*((3*a^2 - b^2)*Sec[c + d*x]^3) - (b^2*Sec[c + d*x]^5)/5))/d) + (a*((3*b^2*Sin[c + d*x])/(4*(1 - Sin[c + d*x]^2)^2) + ((4*a^2 - 3*b^2)*(Ar cTanh[Sin[c + d*x]]/2 + Sin[c + d*x]/(2*(1 - Sin[c + d*x]^2))))/4))/d
3.6.38.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _), x_Symbol] :> Module[{k}, Int[Sec[e + f*x]^m*Sum[Binomial[n, 2*k]*a^(n - 2*k)*b^(2*k)*Tan[e + f*x]^(2*k), {k, 0, n/2}], x] + Int[Sec[e + f*x]^m*Tan [e + f*x]*Sum[Binomial[n, 2*k + 1]*a^(n - 2*k - 1)*b^(2*k + 1)*Tan[e + f*x] ^(2*k), {k, 0, (n - 1)/2}], x]] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 *x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFacto rs[Cos[c*(a + b*x)], x]}, Simp[-(b*c)^(-1) Subst[Int[SubstFor[1/x, Cos[c* (a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[c*(a + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Tan] || EqQ[F, tan])
Time = 9.24 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.57
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {a^{2} b}{\cos \left (d x +c \right )^{3}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{15}\right )}{d}\) | \(198\) |
default | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {a^{2} b}{\cos \left (d x +c \right )^{3}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{15}\right )}{d}\) | \(198\) |
risch | \(-\frac {{\mathrm e}^{i \left (d x +c \right )} \left (60 i a^{3} {\mathrm e}^{8 i \left (d x +c \right )}-45 i a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+120 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+270 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-480 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+160 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-960 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-64 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-120 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-270 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-480 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+160 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-60 i a^{3}+45 i a \,b^{2}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{8 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{8 d}\) | \(335\) |
1/d*(a^3*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+a^2*b/c os(d*x+c)^3+3*a*b^2*(1/4*sin(d*x+c)^3/cos(d*x+c)^4+1/8*sin(d*x+c)^3/cos(d* x+c)^2+1/8*sin(d*x+c)-1/8*ln(sec(d*x+c)+tan(d*x+c)))+b^3*(1/5*sin(d*x+c)^4 /cos(d*x+c)^5+1/15*sin(d*x+c)^4/cos(d*x+c)^3-1/15*sin(d*x+c)^4/cos(d*x+c)- 1/15*(2+sin(d*x+c)^2)*cos(d*x+c)))
Time = 0.26 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.17 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {15 \, {\left (4 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 48 \, b^{3} + 80 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left (6 \, a b^{2} \cos \left (d x + c\right ) + {\left (4 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \]
1/240*(15*(4*a^3 - 3*a*b^2)*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 15*(4*a ^3 - 3*a*b^2)*cos(d*x + c)^5*log(-sin(d*x + c) + 1) + 48*b^3 + 80*(3*a^2*b - b^3)*cos(d*x + c)^2 + 30*(6*a*b^2*cos(d*x + c) + (4*a^3 - 3*a*b^2)*cos( d*x + c)^3)*sin(d*x + c))/(d*cos(d*x + c)^5)
\[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \]
Time = 0.39 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.25 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {45 \, a b^{2} {\left (\frac {2 \, {\left (\sin \left (d x + c\right )^{3} + \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + \frac {240 \, a^{2} b}{\cos \left (d x + c\right )^{3}} - \frac {16 \, {\left (5 \, \cos \left (d x + c\right )^{2} - 3\right )} b^{3}}{\cos \left (d x + c\right )^{5}}}{240 \, d} \]
1/240*(45*a*b^2*(2*(sin(d*x + c)^3 + sin(d*x + c))/(sin(d*x + c)^4 - 2*sin (d*x + c)^2 + 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 60*a^3 *(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d* x + c) - 1)) + 240*a^2*b/cos(d*x + c)^3 - 16*(5*cos(d*x + c)^2 - 3)*b^3/co s(d*x + c)^5)/d
Leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (115) = 230\).
Time = 0.75 (sec) , antiderivative size = 333, normalized size of antiderivative = 2.64 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {15 \, {\left (4 \, a^{3} - 3 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (4 \, a^{3} - 3 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (60 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 45 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 270 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 720 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 240 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 480 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 270 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 240 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 60 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 45 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, a^{2} b + 16 \, b^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \]
1/120*(15*(4*a^3 - 3*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15*(4*a^3 - 3*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(60*a^3*tan(1/2*d*x + 1 /2*c)^9 + 45*a*b^2*tan(1/2*d*x + 1/2*c)^9 - 360*a^2*b*tan(1/2*d*x + 1/2*c) ^8 - 120*a^3*tan(1/2*d*x + 1/2*c)^7 + 270*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 7 20*a^2*b*tan(1/2*d*x + 1/2*c)^6 - 240*b^3*tan(1/2*d*x + 1/2*c)^6 - 480*a^2 *b*tan(1/2*d*x + 1/2*c)^4 - 80*b^3*tan(1/2*d*x + 1/2*c)^4 + 120*a^3*tan(1/ 2*d*x + 1/2*c)^3 - 270*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 240*a^2*b*tan(1/2*d* x + 1/2*c)^2 - 80*b^3*tan(1/2*d*x + 1/2*c)^2 - 60*a^3*tan(1/2*d*x + 1/2*c) - 45*a*b^2*tan(1/2*d*x + 1/2*c) - 120*a^2*b + 16*b^3)/(tan(1/2*d*x + 1/2* c)^2 - 1)^5)/d
Time = 8.18 (sec) , antiderivative size = 293, normalized size of antiderivative = 2.33 \[ \int \sec ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (a^3+\frac {3\,a\,b^2}{4}\right )-2\,a^2\,b-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {9\,a\,b^2}{2}-2\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (\frac {9\,a\,b^2}{2}-2\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (4\,a^2\,b-\frac {4\,b^3}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (8\,a^2\,b+\frac {4\,b^3}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (12\,a^2\,b-4\,b^3\right )+\frac {4\,b^3}{15}-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^3+\frac {3\,a\,b^2}{4}\right )-6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {3\,a\,b^2}{4}-a^3\right )}{d} \]
(tan(c/2 + (d*x)/2)^9*((3*a*b^2)/4 + a^3) - 2*a^2*b - tan(c/2 + (d*x)/2)^3 *((9*a*b^2)/2 - 2*a^3) + tan(c/2 + (d*x)/2)^7*((9*a*b^2)/2 - 2*a^3) + tan( c/2 + (d*x)/2)^2*(4*a^2*b - (4*b^3)/3) - tan(c/2 + (d*x)/2)^4*(8*a^2*b + ( 4*b^3)/3) + tan(c/2 + (d*x)/2)^6*(12*a^2*b - 4*b^3) + (4*b^3)/15 - tan(c/2 + (d*x)/2)*((3*a*b^2)/4 + a^3) - 6*a^2*b*tan(c/2 + (d*x)/2)^8)/(d*(5*tan( c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*t an(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1)) - (atanh(tan(c/2 + (d*x) /2))*((3*a*b^2)/4 - a^3))/d